/* eslint-disable */
import request from '@/utils/request'

// 供应商列表
export function getProviderList(params) {
  return request({
    url: '/supplier/list',
    method: 'get',
    params
  })
}
// 供应商详情
export function getProviderDetails(params) {
  return request({
    url: '/supplier/detail/' + params.id,
    method: 'get',
    params
  })
}
// 添加供应商
export function addProvider(data) {
  return request({
    url: '/supplier/add',
    method: 'post',
    data
  })
}
// 添加供应商
export function changeProvider(data) {
  return request({
    url: '/supplier/add',
    method: 'put',
    data
  })
}
//设置供应商的状态
export function setproviderstatus(data) {
  return request({
    url: '/supplier/setStatus/' + data.id,
    method: 'put',
    data
  })
}
//资金变动记录
export function zijinchange(params) {
  return request({
    url: '/supplier/accountLog/' + params.id,
    method: 'get',
    params
  })
}
//订单记录
export function getOrderList(params) {
  return request({
    url: '/supplier/businessTrade/' + params.id,
    method: 'get',
    params
  })
}
//采购记录
export function getCaigouList(params) {
  return request({
    url: '/supplier/purchaseList/' + params.id,
    method: 'get',
    params
  })
}
//入驻信息
export function getCheckDetails(params) {
  return request({
    url: `/store/${params.id}/audit`,
    method: 'get',
    params
  })
}
// 入驻审核
export function checkStore(params) {
  return request({
    url: `/supplier/${params.id}/audit`,
    method: 'put',
    params
  })
}
